package cn.com.shopec.erp.stock.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * @ClassName: StockHistory
 * @Description: 库存变更记录实体类
 * @author: zengxuezhou
 * @date: 2016年11月28日 下午2:26:05
 */
@Entity
@Table(name = "TBL_STOCK_HISTORY")
public class StockHistory implements Serializable {

	private static final long serialVersionUID = 8387897370973160964L;

	/** id **/
	private String id;

	/** 货品编号 **/
	private String prodNo;
	
	/** 商品编号 **/
	private String commoNo;
	
	/** 仓库编号 **/
	private String whNo;

	/** 供应商编号 */
	private String supNo;

	/** 出入库单号 **/
	private String stockNo;

	/**
	 * 出入库类型 （1.货品采购入库 2.订单退换货入库 3.次品换货入库 4.借出归还入库 5.调拨入库 6.其他入库 ) （-1.商品销售库
	 * -2.商品退换货出库)
	 * 
	 * 为正数时则为入库类型，为负数时则为出库类型
	 **/
	private Integer stockType;

	/** 单号 **/
	private String stockTypeNo;
	
	/** 单号 */
	private String purNo;

	/** 出入数量 **/
	private Long changeQuantity;

	/** 原数量 **/
	private Long originalQuantity;

	/** 出入库，创建人员 **/
	private String creater;

	/** 出入库，创建日期 **/
	private Date createTime;

	/** 修改人员 **/
	private String updater;

	/** 修改日期 **/
	private Date updateTime;

	/** 删除标识 **/
	private Integer deletedFlag;

	@Id
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "PROD_NO")
	public String getProdNo() {
		return prodNo;
	}

	public void setProdNo(String prodNo) {
		this.prodNo = prodNo;
	}

	@Column(name = "WH_NO")
	public String getWhNo() {
		return whNo;
	}

	public void setWhNo(String whNo) {
		this.whNo = whNo;
	}

	@Column(name = "STOCK_NO")
	public String getStockNo() {
		return stockNo;
	}

	public void setStockNo(String stockNo) {
		this.stockNo = stockNo;
	}

	@Column(name = "STOCK_TYPE")
	public Integer getStockType() {
		return stockType;
	}

	public void setStockType(Integer stockType) {
		this.stockType = stockType;
	}

	@Column(name = "CHANGE_QUANTITY")
	public Long getChangeQuantity() {
		return changeQuantity;
	}

	public void setChangeQuantity(Long changeQuantity) {
		this.changeQuantity = changeQuantity;
	}

	@Column(name = "ORIGINAL_QUANTITY")
	public Long getOriginalQuantity() {
		return originalQuantity;
	}

	public void setOriginalQuantity(Long originalQuantity) {
		this.originalQuantity = originalQuantity;
	}

	@Column(name = "SUP_NO")
	public String getSupNo() {
		return supNo;
	}

	public void setSupNo(String supNo) {
		this.supNo = supNo;
	}

	@Column(name = "STOCK_TYPE_NO")
	public String getStockTypeNo() {
		return stockTypeNo;
	}

	public void setStockTypeNo(String stockTypeNo) {
		this.stockTypeNo = stockTypeNo;
	}

	@Column(name = "CREATE_TIME")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "CREATER")
	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	@Column(name = "UPDATER")
	public String getUpdater() {
		return updater;
	}

	public void setUpdater(String updater) {
		this.updater = updater;
	}

	@Column(name = "UPDATE_TIME")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "DELETED_FLAG")
	public Integer getDeletedFlag() {
		return deletedFlag;
	}

	public void setDeletedFlag(Integer deletedFlag) {
		this.deletedFlag = deletedFlag;
	}
	@Column(name = "COMMO_NO")
	public String getCommoNo() {
		return commoNo;
	}

	public void setCommoNo(String commoNo) {
		this.commoNo = commoNo;
	}

	@Column(name = "PUR_NO")
	public String getPurNo() {
		return purNo;
	}

	public void setPurNo(String purNo) {
		this.purNo = purNo;
	}
}